Skip to content

Remove searchResultsToConsider setting and hardcode to 6#2113

Merged
felladrin merged 2 commits into
mainfrom
remove-search-results-to-consider
Jul 13, 2026
Merged

Remove searchResultsToConsider setting and hardcode to 6#2113
felladrin merged 2 commits into
mainfrom
remove-search-results-to-consider

Conversation

@felladrin

Copy link
Copy Markdown
Owner

Summary

Remove the searchResultsToConsider slider from AI settings and hardcode the value to 6.

Changes

  • Removed searchResultsToConsider from defaultSettings in client/modules/settings.ts
  • Removed the slider UI from AISettingsForm.tsx (including the useMemo for marks and unused imports)
  • Updated canStartResponding() in textGenerationUtilities.ts to always wait for search results (removed the > 0 guard)
  • Hardcoded 6 in textGeneration.ts and ChatInterface.tsx where searchResultsToConsider was used for slicing results
  • Updated tests in settings.test.ts
  • Updated documentation: configuration.md, ai-integration.md, overview.md

Rationale

The default value of 3 was too few for good LLM responses. Hardcoding to 6 gives the model more context without requiring user configuration. The slider was a false choice — most users left it at 3, which produced suboptimal results.

- Remove the slider from AI settings UI
- Remove searchResultsToConsider from defaultSettings
- Always wait for search results in canStartResponding()
- Hardcode .slice(0, 6) in text generation and chat interface
- Update tests and documentation
The value 6 was duplicated as a bare literal in textGeneration.ts and
ChatInterface.tsx; a change to one could miss the other. Extract it as
a named constant in textGenerationUtilities.ts (alongside
defaultContextSize) and reference it at both sites.

Also document the fixed value in ai-integration.md so self-hosters know
why the AI context always draws on the top 6 results.
@felladrin felladrin marked this pull request as ready for review July 13, 2026 12:45
@felladrin felladrin merged commit f6a6819 into main Jul 13, 2026
2 checks passed
@felladrin felladrin deleted the remove-search-results-to-consider branch July 13, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant